﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bdcs.Core.Entity
{
    /// <summary>
    /// DeviceTest数据模型对象
    /// </summary>
    [Serializable]
    public partial class DeviceTestMod
    {
        /// <summary>
        /// 初始化DeviceTest数据模型对象
        /// </summary>
        public DeviceTestMod()
        {
            
        }
        /// <summary>
        /// 初始化DeviceTest数据模型对象并给在SQL中不能为空的字段赋值
        /// </summary>
        /// <param name="deviceNo">DeviceNo</param>
        /// <param name="gPRSModulNO">GPRSModulNO</param>
        public DeviceTestMod(string deviceNo,string gPRSModulNO)
        {
            //给DeviceNo字段赋值
            this.DeviceNo = deviceNo;
            //给GPRSModulNO字段赋值
            this.GPRSModulNO = gPRSModulNO;
        }
        /// <summary>
        /// 初始化DeviceTest数据模型对象并给所有字段赋值
        /// </summary>
        /// <param name="deviceNo">DeviceNo</param>
        /// <param name="model">Model</param>
        /// <param name="innerVer">InnerVer</param>
        /// <param name="testTime">TestTime</param>
        /// <param name="gPRS">GPRS</param>
        /// <param name="gPS">GPS</param>
        /// <param name="emerg">Emerg</param>
        /// <param name="switch2">Switch2</param>
        /// <param name="switch3">Switch3</param>
        /// <param name="switch4">Switch4</param>
        /// <param name="oil">Oil</param>
        /// <param name="phone">Phone</param>
        /// <param name="lED">LED</param>
        /// <param name="lCD">LCD</param>
        /// <param name="switch1">Switch1</param>
        /// <param name="bugDesc">BugDesc</param>
        /// <param name="voice">Voice</param>
        /// <param name="testman">Testman</param>
        /// <param name="bootLoad">BootLoad</param>
        /// <param name="flash">Flash</param>
        /// <param name="hexFileName">HexFileName</param>
        /// <param name="hexTime">HexTime</param>
        /// <param name="hexMan">HexMan</param>
        /// <param name="hostVersion">HostVersion</param>
        /// <param name="moniVersion">MoniVersion</param>
        /// <param name="gPRSModulNO">GPRSModulNO</param>
        /// <param name="cAM">CAM</param>
        public DeviceTestMod(string deviceNo,string model,string innerVer,DateTime? testTime,int? gPRS,int? gPS,int? emerg,int? switch2,int? switch3,int? switch4,int? oil,int? phone,int? lED,int? lCD,int? switch1,string bugDesc,int? voice,string testman,int? bootLoad,int? flash,string hexFileName,DateTime? hexTime,string hexMan,string hostVersion,string moniVersion,string gPRSModulNO,int? cAM)
        {
            //给DeviceNo字段赋值
            this.DeviceNo = deviceNo;
            //给Model字段赋值
            this.Model = model;
            //给InnerVer字段赋值
            this.InnerVer = innerVer;
            //给TestTime字段赋值
            this.TestTime = testTime;
            //给GPRS字段赋值
            this.GPRS = gPRS;
            //给GPS字段赋值
            this.GPS = gPS;
            //给Emerg字段赋值
            this.Emerg = emerg;
            //给Switch2字段赋值
            this.Switch2 = switch2;
            //给Switch3字段赋值
            this.Switch3 = switch3;
            //给Switch4字段赋值
            this.Switch4 = switch4;
            //给Oil字段赋值
            this.Oil = oil;
            //给Phone字段赋值
            this.Phone = phone;
            //给LED字段赋值
            this.LED = lED;
            //给LCD字段赋值
            this.LCD = lCD;
            //给Switch1字段赋值
            this.Switch1 = switch1;
            //给BugDesc字段赋值
            this.BugDesc = bugDesc;
            //给Voice字段赋值
            this.Voice = voice;
            //给Testman字段赋值
            this.Testman = testman;
            //给BootLoad字段赋值
            this.BootLoad = bootLoad;
            //给Flash字段赋值
            this.Flash = flash;
            //给HexFileName字段赋值
            this.HexFileName = hexFileName;
            //给HexTime字段赋值
            this.HexTime = hexTime;
            //给HexMan字段赋值
            this.HexMan = hexMan;
            //给HostVersion字段赋值
            this.HostVersion = hostVersion;
            //给MoniVersion字段赋值
            this.MoniVersion = moniVersion;
            //给GPRSModulNO字段赋值
            this.GPRSModulNO = gPRSModulNO;
            //给CAM字段赋值
            this.CAM = cAM;
        }
        
		//属性存储数据的变量
        private string _deviceNo;
        private string _model;
        private string _innerVer;
        private DateTime? _testTime;
        private int? _gPRS;
        private int? _gPS;
        private int? _emerg;
        private int? _switch2;
        private int? _switch3;
        private int? _switch4;
        private int? _oil;
        private int? _phone;
        private int? _lED;
        private int? _lCD;
        private int? _switch1;
        private string _bugDesc;
        private int? _voice;
        private string _testman;
        private int? _bootLoad;
        private int? _flash;
        private string _hexFileName;
        private DateTime? _hexTime;
        private string _hexMan;
        private string _hostVersion;
        private string _moniVersion;
        private string _gPRSModulNO;
        private int? _cAM;
        
        /// <summary>
        /// DeviceNo
        /// </summary>
        public string DeviceNo
        {
            get { return this._deviceNo; }
            set { this._deviceNo = value; }
        }
        /// <summary>
        /// Model
        /// </summary>
        public string Model
        {
            get { return this._model; }
            set { this._model = value; }
        }
        /// <summary>
        /// InnerVer
        /// </summary>
        public string InnerVer
        {
            get { return this._innerVer; }
            set { this._innerVer = value; }
        }
        /// <summary>
        /// TestTime
        /// </summary>
        public DateTime? TestTime
        {
            get { return this._testTime; }
            set { this._testTime = value; }
        }
        /// <summary>
        /// GPRS
        /// </summary>
        public int? GPRS
        {
            get { return this._gPRS; }
            set { this._gPRS = value; }
        }
        /// <summary>
        /// GPS
        /// </summary>
        public int? GPS
        {
            get { return this._gPS; }
            set { this._gPS = value; }
        }
        /// <summary>
        /// Emerg
        /// </summary>
        public int? Emerg
        {
            get { return this._emerg; }
            set { this._emerg = value; }
        }
        /// <summary>
        /// Switch2
        /// </summary>
        public int? Switch2
        {
            get { return this._switch2; }
            set { this._switch2 = value; }
        }
        /// <summary>
        /// Switch3
        /// </summary>
        public int? Switch3
        {
            get { return this._switch3; }
            set { this._switch3 = value; }
        }
        /// <summary>
        /// Switch4
        /// </summary>
        public int? Switch4
        {
            get { return this._switch4; }
            set { this._switch4 = value; }
        }
        /// <summary>
        /// Oil
        /// </summary>
        public int? Oil
        {
            get { return this._oil; }
            set { this._oil = value; }
        }
        /// <summary>
        /// Phone
        /// </summary>
        public int? Phone
        {
            get { return this._phone; }
            set { this._phone = value; }
        }
        /// <summary>
        /// LED
        /// </summary>
        public int? LED
        {
            get { return this._lED; }
            set { this._lED = value; }
        }
        /// <summary>
        /// LCD
        /// </summary>
        public int? LCD
        {
            get { return this._lCD; }
            set { this._lCD = value; }
        }
        /// <summary>
        /// Switch1
        /// </summary>
        public int? Switch1
        {
            get { return this._switch1; }
            set { this._switch1 = value; }
        }
        /// <summary>
        /// BugDesc
        /// </summary>
        public string BugDesc
        {
            get { return this._bugDesc; }
            set { this._bugDesc = value; }
        }
        /// <summary>
        /// Voice
        /// </summary>
        public int? Voice
        {
            get { return this._voice; }
            set { this._voice = value; }
        }
        /// <summary>
        /// Testman
        /// </summary>
        public string Testman
        {
            get { return this._testman; }
            set { this._testman = value; }
        }
        /// <summary>
        /// BootLoad
        /// </summary>
        public int? BootLoad
        {
            get { return this._bootLoad; }
            set { this._bootLoad = value; }
        }
        /// <summary>
        /// Flash
        /// </summary>
        public int? Flash
        {
            get { return this._flash; }
            set { this._flash = value; }
        }
        /// <summary>
        /// HexFileName
        /// </summary>
        public string HexFileName
        {
            get { return this._hexFileName; }
            set { this._hexFileName = value; }
        }
        /// <summary>
        /// HexTime
        /// </summary>
        public DateTime? HexTime
        {
            get { return this._hexTime; }
            set { this._hexTime = value; }
        }
        /// <summary>
        /// HexMan
        /// </summary>
        public string HexMan
        {
            get { return this._hexMan; }
            set { this._hexMan = value; }
        }
        /// <summary>
        /// HostVersion
        /// </summary>
        public string HostVersion
        {
            get { return this._hostVersion; }
            set { this._hostVersion = value; }
        }
        /// <summary>
        /// MoniVersion
        /// </summary>
        public string MoniVersion
        {
            get { return this._moniVersion; }
            set { this._moniVersion = value; }
        }
        /// <summary>
        /// GPRSModulNO
        /// </summary>
        public string GPRSModulNO
        {
            get { return this._gPRSModulNO; }
            set { this._gPRSModulNO = value; }
        }
        /// <summary>
        /// CAM
        /// </summary>
        public int? CAM
        {
            get { return this._cAM; }
            set { this._cAM = value; }
        }
        
        /// <summary>
        /// 对比两个DeviceTest数据模型对象是否一致
        /// </summary>
        /// <param name="obj">要进行比对的DeviceTest数据模型对象</param>
        /// <returns>返回是否一致，为true一致，为false不一致</returns>
        public override bool Equals(object obj)
        {
            //判断传入对象是否为null
            if (obj == null) return false;
            //将传入对象转换成DeviceTest数据模型对象
            DeviceTestMod deviceTestMod = obj as DeviceTestMod;
            //判断是否转换成功
            if (deviceTestMod == null) return false;
            //进行匹配属性的值
            return
                //判断DeviceNo是否一致
                this.DeviceNo == deviceTestMod.DeviceNo &&
                //判断Model是否一致
                this.Model == deviceTestMod.Model &&
                //判断InnerVer是否一致
                this.InnerVer == deviceTestMod.InnerVer &&
                //判断TestTime是否一致
                this.TestTime == deviceTestMod.TestTime &&
                //判断GPRS是否一致
                this.GPRS == deviceTestMod.GPRS &&
                //判断GPS是否一致
                this.GPS == deviceTestMod.GPS &&
                //判断Emerg是否一致
                this.Emerg == deviceTestMod.Emerg &&
                //判断Switch2是否一致
                this.Switch2 == deviceTestMod.Switch2 &&
                //判断Switch3是否一致
                this.Switch3 == deviceTestMod.Switch3 &&
                //判断Switch4是否一致
                this.Switch4 == deviceTestMod.Switch4 &&
                //判断Oil是否一致
                this.Oil == deviceTestMod.Oil &&
                //判断Phone是否一致
                this.Phone == deviceTestMod.Phone &&
                //判断LED是否一致
                this.LED == deviceTestMod.LED &&
                //判断LCD是否一致
                this.LCD == deviceTestMod.LCD &&
                //判断Switch1是否一致
                this.Switch1 == deviceTestMod.Switch1 &&
                //判断BugDesc是否一致
                this.BugDesc == deviceTestMod.BugDesc &&
                //判断Voice是否一致
                this.Voice == deviceTestMod.Voice &&
                //判断Testman是否一致
                this.Testman == deviceTestMod.Testman &&
                //判断BootLoad是否一致
                this.BootLoad == deviceTestMod.BootLoad &&
                //判断Flash是否一致
                this.Flash == deviceTestMod.Flash &&
                //判断HexFileName是否一致
                this.HexFileName == deviceTestMod.HexFileName &&
                //判断HexTime是否一致
                this.HexTime == deviceTestMod.HexTime &&
                //判断HexMan是否一致
                this.HexMan == deviceTestMod.HexMan &&
                //判断HostVersion是否一致
                this.HostVersion == deviceTestMod.HostVersion &&
                //判断MoniVersion是否一致
                this.MoniVersion == deviceTestMod.MoniVersion &&
                //判断GPRSModulNO是否一致
                this.GPRSModulNO == deviceTestMod.GPRSModulNO &&
                //判断CAM是否一致
                this.CAM == deviceTestMod.CAM;
        }
        /// <summary>
        /// 将当前DeviceTest数据模型对象转换成哈希码
        /// </summary>
        /// <returns>哈希值</returns>
        public override int GetHashCode()
        {
            //将DeviceTest数据模型对象的属性进行按位异或运算处理得到哈希码并返回
            return
                //将DeviceNo进行按位异或运算处理
                (this.DeviceNo == null ? 2147483647 : this.DeviceNo.GetHashCode()) ^
                //将Model进行按位异或运算处理
                (this.Model == null ? 2147483647 : this.Model.GetHashCode()) ^
                //将InnerVer进行按位异或运算处理
                (this.InnerVer == null ? 2147483647 : this.InnerVer.GetHashCode()) ^
                //将TestTime进行按位异或运算处理
                (this.TestTime == null ? 2147483647 : this.TestTime.GetHashCode()) ^
                //将GPRS进行按位异或运算处理
                (this.GPRS == null ? 2147483647 : this.GPRS.GetHashCode()) ^
                //将GPS进行按位异或运算处理
                (this.GPS == null ? 2147483647 : this.GPS.GetHashCode()) ^
                //将Emerg进行按位异或运算处理
                (this.Emerg == null ? 2147483647 : this.Emerg.GetHashCode()) ^
                //将Switch2进行按位异或运算处理
                (this.Switch2 == null ? 2147483647 : this.Switch2.GetHashCode()) ^
                //将Switch3进行按位异或运算处理
                (this.Switch3 == null ? 2147483647 : this.Switch3.GetHashCode()) ^
                //将Switch4进行按位异或运算处理
                (this.Switch4 == null ? 2147483647 : this.Switch4.GetHashCode()) ^
                //将Oil进行按位异或运算处理
                (this.Oil == null ? 2147483647 : this.Oil.GetHashCode()) ^
                //将Phone进行按位异或运算处理
                (this.Phone == null ? 2147483647 : this.Phone.GetHashCode()) ^
                //将LED进行按位异或运算处理
                (this.LED == null ? 2147483647 : this.LED.GetHashCode()) ^
                //将LCD进行按位异或运算处理
                (this.LCD == null ? 2147483647 : this.LCD.GetHashCode()) ^
                //将Switch1进行按位异或运算处理
                (this.Switch1 == null ? 2147483647 : this.Switch1.GetHashCode()) ^
                //将BugDesc进行按位异或运算处理
                (this.BugDesc == null ? 2147483647 : this.BugDesc.GetHashCode()) ^
                //将Voice进行按位异或运算处理
                (this.Voice == null ? 2147483647 : this.Voice.GetHashCode()) ^
                //将Testman进行按位异或运算处理
                (this.Testman == null ? 2147483647 : this.Testman.GetHashCode()) ^
                //将BootLoad进行按位异或运算处理
                (this.BootLoad == null ? 2147483647 : this.BootLoad.GetHashCode()) ^
                //将Flash进行按位异或运算处理
                (this.Flash == null ? 2147483647 : this.Flash.GetHashCode()) ^
                //将HexFileName进行按位异或运算处理
                (this.HexFileName == null ? 2147483647 : this.HexFileName.GetHashCode()) ^
                //将HexTime进行按位异或运算处理
                (this.HexTime == null ? 2147483647 : this.HexTime.GetHashCode()) ^
                //将HexMan进行按位异或运算处理
                (this.HexMan == null ? 2147483647 : this.HexMan.GetHashCode()) ^
                //将HostVersion进行按位异或运算处理
                (this.HostVersion == null ? 2147483647 : this.HostVersion.GetHashCode()) ^
                //将MoniVersion进行按位异或运算处理
                (this.MoniVersion == null ? 2147483647 : this.MoniVersion.GetHashCode()) ^
                //将GPRSModulNO进行按位异或运算处理
                (this.GPRSModulNO == null ? 2147483647 : this.GPRSModulNO.GetHashCode()) ^
                //将CAM进行按位异或运算处理
                (this.CAM == null ? 2147483647 : this.CAM.GetHashCode());
        }
        /// <summary>
        /// 将当前DeviceTest数据模型对象转换成字符串副本【仅显示在SQL中不能为空的列】
        /// </summary>
        /// <returns>字符串形式副本</returns>
        public override string ToString()
        {
            //将当前DeviceTest数据模型对象转换成字符串副本
            return
                "[" +
                //将DeviceNo转换成字符串
                this.DeviceNo + "," +
                //将GPRSModulNO转换成字符串
                this.GPRSModulNO +
                "]";
        }
    }
}
